#pragma once
#include "singleton.h"
#include "psyche.h"

namespace cupid
{

class Socket;
class Network :public Singleton<Network>
{
public:
	Network(void);
	~Network(void);
	void	destroy		(void);
	BOOL	init(const char* szServerIP, int serverPort);
	BOOL	isReady	()	{return m_ready;}
	BOOL	sendMsg (char* bufMsg, DWORD dwSize);

	void	processNetMsg(void);

	DWORD	m_bytesReceived;
	DWORD	m_bytesSend;

private:

	Socket*			m_socket;
	BOOL			m_ready;
};

#define sNetwork cupid::Network::instance()
}